<%--
  Created by IntelliJ IDEA.
  User: l
  Date: 2022/5/25
  Time: 14:57
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<!DOCTYPE html>
<html>
<head lang="en">
    <meta charset="utf-8"/>
    <title>order</title>
    <link rel="stylesheet" type="text/css" href="css/public.css"/>
    <link rel="stylesheet" type="text/css" href="css/proList.css"/>
    <link rel="stylesheet" type="text/css" href="css/mygxin.css"/>
    <script src="js/jquery-1.12.4.min.js"></script>
</head>
<body><!----------------------------------------order------------------>
<%@ include file="header1.jsp" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<div class="order cart mt"><!-----------------site------------------->
    <div class="site"><p class="wrapper clearfix"><span class="fl">订单确认</span><img class="top"
                                                                                   src="img/temp/cartTop02.png"></p>
    </div><!-----------------orderCon------------------->
    <div class="orderCon wrapper clearfix">
        <div class="orderL fl"><!--------h3----------------><h3>收件信息<a href="#" class="fr orderInput" id="readd">新增地址</a></h3>
            <!--------addres---------------->
            <div class="addres clearfix">
                <c:if test="${ds.id != null}">
                <div class="addre fl on">
                    <div><input type="radio" checked="checked" name="dizi" value="${ds.id}"></div>
                    <div class="tit clearfix"><p class="fl">${ds.user_name}<span class="default">[默认地址]</span></p>
                        <p class="fr"><a href="deletedr?id=${ds.id}&ids=${ids}">删除</a><span>|</span><a href="orderselect?did=${ds.id}&eids=${ids}" class="edit">编辑</a></p></div>
                    <div class="addCon"><p>${ds.user_address}</p>
                        <p>${ds.user_mobile}</p></div>
                </div>
                </c:if>
                <c:forEach var="ad" items="${ad}">
                <div class="addre fl">
                    <div><input type="radio" name="dizi" value="${ad.id}"></div>
                    <div class="tit clearfix"><p class="fl">${ad.user_name}</p>
                        <p class="fr"><a href="moren?name=${ad.user_name}&name1=${ds.user_name}&id=${ad.user_id}&ids=${ids}" class="setDefault">设为默认</a><span>|</span>
                            <a href="deletedr?id=${ad.id}&ids=${ids}">删除</a><span>|</span><a href="orderselect?did=${ad.id}&eids=${ids}" class="edit">编辑</a></p></div>
                    <div class="addCon"><p>${ad.user_address}</p>
                        <p>${ad.user_mobile}</p></div>
                </div>
                </c:forEach>
            </div>
            <h3>支付方式</h3><!--------way---------------->
            <div class="way clearfix"><img class="on" src="img/temp/way01.jpg"><img src="img/temp/way02.jpg"><img
                    src="img/temp/way03.jpg"><img src="img/temp/way04.jpg"></div>
            <h3>选择快递</h3><!--------dis---------------->
            <div class="dis clearfix"><span class="on">顺风快递</span><span>百世汇通</span><span>圆通快递</span><span>中通快递</span>
            </div>
        </div>
        <div class="orderR fr">
            <div class="msg"><h3>订单内容<a href="showcart" class="fr">返回购物车</a></h3><!--------ul---------------->
                <c:forEach items="${requestScope.shoplist}" var="rs">
                    <ul class="clearfix">
                        <li class="fl"><img width="100px" height="100px" src="image/product/${rs.cart_p_filename}"></li>
                        <li class="fl"><p>${rs.cart_p_name}</p>
                            <p>数量：${rs.cart_quantity}</p></li>
                        <li class="fr">￥${rs.cart_p_price * rs.cart_quantity}</li>
                    </ul>
                </c:forEach>
            </div><!--------tips---------------->
            <div class="tips"><p><span class="fl">商品金额：</span><span class="fr">￥${totalprice}</span></p>
                <p><span class="fl">优惠金额：</span><span class="fr">￥0.00</span></p>
                <p><span class="fl">运费：</span><span class="fr">免运费</span></p></div><!--------tips count---------------->
            <div class="count tips"><p><span class="fl">合计：</span><span class="fr">￥${totalprice}</span></p></div>
            <!--<input type="button" name="" value="去支付">--> <a href="javascript:toorder()" class="pay">去支付</a></div>
    </div>
</div>
<script>
    function toorder() {
        var a = $("input[name='dizi']:checked").val();
        location.href= "okselect?eids=${ids}&dzid="+a;
    }

</script><!--编辑弹框--><!--遮罩-->
<div class="mask"></div>
<div class="adddz editAddre">
    <form action="doaddressupdate" method="post">
        <input type="hidden" name="eids" value="${ids}">
        <input type="hidden" name="userid" value="${are.user_id}">
        <input type="hidden" name="name1" value="${name.user_name}">
        <input type="text" value="${are.user_name}" name="name" placeholder="姓名" class="on"/>
        <input type="text" name="userp" value="${are.user_mobile}" placeholder="电话号码"/>
        <textarea name="useraddress" rows="" cols="" placeholder="详细地址">${are.user_address}</textarea>
        <div class="bc"><input type="submit" value="保存"/><input type="button" value="取消"/></div>
    </form>
</div>
<div class="readd">
    <form action="doaddressadd" method="post">
        <input type="hidden" name="id" value="${name.user_id}">
        <input type="hidden" name="eids" value="${ids}">
        <input type="text" name="name" class="on" placeholder="姓名"/>
        <input type="text" name="mb" placeholder="电话号码"/>
        <textarea name="ar" rows="" cols="" placeholder="详细地址"></textarea>
        <div class="bc"><input type="submit" value="保存"/><input type="button" value="取消"/></div>
    </form>
</div>
<!--返回顶部-->
<script>
    var url = window.location.href;
    var result = url.split("?")[1];
    var val = result.split("&");
    var len = val.length;
    for(var i=0; i<len; i++) {
        if(val[i].split("=")[0] === "did") {
            $(".mask").show();
            $(".adddz").show();
        }
    }
</script>
<div class="gotop">
    <a href="showcart">
        <dl class="goCart">
            <dt><img src="img/gt1.png"/></dt>
            <dd>去购<br/>物车</dd>
        </dl>
    </a><a href="#" class="dh">
    <dl>
        <dt><img src="img/gt2.png"/></dt>
        <dd>联系<br/>客服</dd>
    </dl>
</a><a href="mygxinselect">
    <dl>
        <dt><img src="img/gt3.png"/></dt>
        <dd>个人<br/>中心</dd>
    </dl>
</a><a href="#" class="toptop" style="display: none;">
    <dl>
        <dt><img src="img/gt4.png"/></dt>
        <dd>返回<br/>顶部</dd>
    </dl>
</a>
    <p>400-800-8200</p></div><!--footer-->
<div class="footer">
    <div class="top">
        <div class="wrapper">
            <div class="clearfix"><a href="#2" class="fl"><img src="img/foot1.png"/></a><span class="fl">7天无理由退货</span>
            </div>
            <div class="clearfix"><a href="#2" class="fl"><img src="img/foot2.png"/></a><span class="fl">15天免费换货</span>
            </div>
            <div class="clearfix"><a href="#2" class="fl"><img src="img/foot3.png"/></a><span class="fl">满599包邮</span>
            </div>
            <div class="clearfix"><a href="#2" class="fl"><img src="img/foot4.png"/></a><span class="fl">手机特色服务</span>
            </div>
        </div>
    </div>
    <p class="dibu">最家家居&copy;2013-2017公司版权所有 京ICP备080100-44备0000111000号<br/>
        违法和不良信息举报电话：188-0130-1238，本网站所列数据，除特殊说明，所有数据均出自我司实验室测试</p></div>
<script src="js/jquery-1.12.4.min.js" type="text/javascript" charset="utf-8"></script>
<script src="js/public.js" type="text/javascript" charset="utf-8"></script>
<script src="js/pro.js" type="text/javascript" charset="utf-8"></script>
<script src="js/user.js" type="text/javascript" charset="utf-8"></script>
</body>
</html>
